# coding=utf-8
# 联系方式 qq:638476


name_dict = {'name':'ben','age':22,'sex':'男'}
print(name_dict.setdefault("class","动脑学院"))
del name_dict['age']
print(name_dict)
b={'who':'gavin'}
name_dict.update(b)
print(name_dict)
print(name_dict.clear())



a = {3,5,1,2,7}
b = {1, 2, 3, 11}
print(a&b)
print(a|b)
print(a^b)
print(a-b)

num_dict = {'a':13,'b':22,'c':18,'d':24}
a=sorted(num_dict.items(),key=lambda x:x[1],reverse=False)
print(a)



